package operations;

import book.Book;
import book.BookList;

public class DisplayOperation implements IOperations{
    @Override
    public void work(BookList bookList) {
//        System.out.println("显示图书");
        int currentsize = bookList.getUsedSize();
        for (int i =0; i < currentsize; i++){
            Book book = bookList.getBook(i);
            System.out.println(book);//重写了tostring方法会自动调用 NB
            }
        }

    }

